{
  //interface接口，只能用于定义对象类型，type更灵活
  interface my {
    name:string,
    age:number,
    goTo:(route:string)=>void
  }
  // extends表示接口继承，拥有被继承的接口属性
  interface myson extends my {
    score:number
  }
  let me:my={
    name:"yx",
    age:18,
    goTo(route){
      console.log(route)
    }
  }
  console.log(me)
  let myson:myson={
    name:"yx",
    age:18,
    score:99,
    goTo(route){
      console.log(route)
    }
  }
  console.log(myson)
  type father={
    name:string,
    age:number
  }
  //用type实现类型接口继承的功能
  type son={
    like:string
  } & father
  let son:son={
    name:"gf",
    age:99,
    like:"打牌"
  }
}